package eecs.umich.threegtest;

import java.io.FileInputStream;
import java.io.IOException;

import android.os.Environment;
import android.util.Log;

class write_to_file extends Thread {
    public void run() {
        String state = Environment.getExternalStorageState();

        if ( state.equalsIgnoreCase( Environment.MEDIA_MOUNTED ) ) {
            try {
                Log.v( "check", "writing" );
                String src = "/data/data/eecs.umich.threegtest/files/UMLogger.txt";
                FileInputStream fin = new FileInputStream( src );
                fin.close();
                new CopyFile( src ).start();
            }
            catch ( IOException e ) {
                // TODO Auto-gen+erated catch block
                Log.v( "check", "error " + e.getMessage() );
                e.printStackTrace();
            }
        }
        else {}

    }

}
